<?php
/**
 * Created by PhpStorm.
 * User: 图图
 * Date: 2021-1-4
 * Time: 11:05
 */
namespace app\common\model;
use think\Db;
use think\Model;
class Nav extends Model
{
    protected $name = 'qt_nav';
    protected $pk = 'id';
    protected $autoWriteTimestamp = true;
    public static function delcat($id){
        $res=Db::name('qt_nav')->where('pid',$id)->find();
        if($res)
        {
            $msg='请先删除分类下面的子分类';
            return $msg;
        }
    }

}
